package com.jilujia.web.editor;

import java.beans.PropertyEditorSupport;

import org.apache.commons.lang.StringUtils;

import com.jilujia.domain.blog.BlogCatalog;

public class BlogCatalogEditor extends PropertyEditorSupport {

	@Override
	public void setAsText(String text) throws IllegalArgumentException {
		if (!StringUtils.isBlank(text)) {
			BlogCatalog blogCatalog = new BlogCatalog();
			blogCatalog.setId(Long.valueOf(text));
			setValue(blogCatalog);
		}
	}
}
